package com.crazy.crazymodel.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Date: 2024-05-06-19:59
 * @Author: Zheng Zeliang
 * 银行卡
 */
@TableName(value = "bank_card")
@Data
public class BankCard implements Serializable {
    /**
     * 银行卡ID(不是银行卡号，只是个主键)
     */
    @TableId(value = "bankCardID")
    private Integer bankCardID;

    /**
     * 银行卡号
     */
    private String bankCardNumber;

    /**
     * 银行卡类型, 1表示借记卡, 2表示信用卡
     */
    private Integer type;

    /**
     * 开户银行
     */
    private String bankName;

    /**
     * 开户支行
     */
    private String bankBranch;

    /**
     * 银行卡余额
     */
    private BigDecimal balance;

    /**
     * 有效期
     */
    private Date expiryDate;

    /**
     * 安全代码
     */
    private String cvv;

    /**
     * 客户ID
     */
    private Integer customerID;

    /**
     * 是否是主卡, 0表示不是, 1表示是
     */
    private Integer isPrimary;

    /**
     * 银行卡状态, 0表示已注销, 1表示正常使用
     */
    private Integer status;

    /**
     * 生成时间
     */
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime", fill = FieldFill.UPDATE)
    private Date updateTime;

    public BankCard() {
        this.bankCardID = null;
        this.bankCardNumber = null;
        this.type = null;
        this.bankName = null;
        this.bankBranch = null;
        this.balance = null;
        this.expiryDate = null;
        this.cvv = null;
        this.customerID = null;
        this.isPrimary = null;
        this.status = null;
        this.createTime = null;
        this.updateTime = null;
    }

    public BankCard(Integer bankCardID, String bankCardNumber, Integer type, String bankName, String bankBranch, Date expiryDate, String cvv, Integer customerID, Integer isPrimary, Integer status, Date createTime, Date updateTime) {
        this.bankCardID = bankCardID;
        this.bankCardNumber = bankCardNumber;
        this.type = type;
        this.bankName = bankName;
        this.bankBranch = bankBranch;
        this.balance = balance;
        this.expiryDate = expiryDate;
        this.cvv = cvv;
        this.customerID = customerID;
        this.isPrimary = isPrimary;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
}
